<!DOCTYPE html>
<html lang="en-us">
  <head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="robots" content="noodp"/>
  <meta name="author" content="Mr.wei">
  
  
  
  <link rel="prev" href="http://blog.mr-wei.cn/2019/debian-9-%E5%AE%89%E8%A3%85%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2/" />
  
  <link rel="canonical" href="http://blog.mr-wei.cn/2019/nrf52840%E4%BF%AE%E6%94%B9lfclk%E6%97%B6%E9%92%9F%E6%BA%90/" />
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
  <link rel="manifest" href="/site.webmanifest">
  <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
  <meta name="msapplication-TileColor" content="#da532c">
  <meta name="theme-color" content="#ffffff">
  <title>
       
       
           NRF52840修改LFCLK时钟源 | Mr.wei
       
  </title>
  <meta name="title" content="NRF52840修改LFCLK时钟源 | Mr.wei">
    
  
  <link rel="stylesheet" href="/font/iconfont.css">
  <link rel="stylesheet" href="/css/main.min.css">


  
  
 

<script type="application/ld+json">
 "@context" : "http://schema.org",
    "@type" : "BlogPosting",
    "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "http:\/\/blog.mr-wei.cn"
    },
    "articleSection" : "posts",
    "name" : "NRF52840修改LFCLK时钟源",
    "headline" : "NRF52840修改LFCLK时钟源",
    "description" : "LFCLK的时钟源 NRF52840的LFCLK时钟源支持以下3种来源:\n LFRC 32.768KHz RC oscillator LFXO 32.768KHz crystal oscillator LFSYNT 32.768KHz synthesized from HFCLK  修改LFCLK时钟源为RC \/\/ \x26lt;o\x26gt; NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source \/\/ \x26lt;0=\x26gt; RC \/\/ \x26lt;1=\x26gt; XTAL \/\/ \x26lt;2=\x26gt; Synth \/\/ \x26lt;131073=\x26gt; External Low Swing \/\/ \x26lt;196609=\x26gt; External Full Swing #ifndef NRFX_CLOCK_CONFIG_LF_SRC #define NRFX_CLOCK_CONFIG_LF_SRC 0\t\/\/mr-wei #endif \/\/ \x26lt;o\x26gt; CLOCK_CONFIG_LF_SRC - LF Clock Source \/\/ \x26lt;0=\x26gt; RC \/\/ \x26lt;1=\x26gt; XTAL \/\/ \x26lt;2=\x26gt; Synth \/\/ \x26lt;131073=\x26gt; External Low Swing \/\/ \x26lt;196609=\x26gt; External Full Swing #ifndef CLOCK_CONFIG_LF_SRC #define CLOCK_CONFIG_LF_SRC 0\t\/\/mr-wei #endif \/\/ \x26lt;o\x26gt; NRF_SDH_CLOCK_LF_SRC - SoftDevice clock source.",
    "inLanguage" : "en-us",
    "author" : "Mr.wei",
    "creator" : "Mr.wei",
    "publisher": "Mr.wei",
    "accountablePerson" : "Mr.wei",
    "copyrightHolder" : "Mr.wei",
    "copyrightYear" : "2019",
    "datePublished": "2019-09-05 12:31:42 \x2b0800 CST",
    "dateModified" : "2019-09-05 12:31:42 \x2b0800 CST",
    "url" : "http:\/\/blog.mr-wei.cn\/2019\/nrf52840%E4%BF%AE%E6%94%B9lfclk%E6%97%B6%E9%92%9F%E6%BA%90\/",
    "wordCount" : "218",
    "keywords" : [ "NRF52840", "Mr.wei"]
}
</script>

</head>

  


  <body class="">
    <div class="wrapper">
        <nav class="navbar">
    <div class="container">
        <div class="navbar-header header-logo">
        	<a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-xihuan"></i></a>&nbsp;<a href="http://blog.mr-wei.cn">Mr.wei</a>
        </div>
        <div class="menu navbar-right">
                
                
                <a class="menu-item" href="/posts/" title="">Blog</a>
                
                <a class="menu-item" href="http://balance.mr-wei.cn" title="">BalanceCar</a>
                
                <a class="menu-item" href="/categories/" title="">Categories</a>
                
                <a class="menu-item" href="/tags/" title="">Tags</a>
                
                <a class="menu-item" href="/about/" title="About">About</a>
                
        </div>
    </div>
</nav>
<nav class="navbar-mobile" id="nav-mobile" style="display: none">
     <div class="container">
        <div class="navbar-header">
            <div>  <a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-xihuan"></i></a>&nbsp;<a href="http://blog.mr-wei.cn">Mr.wei</a></div>
            <div class="menu-toggle">
                <span></span><span></span><span></span>
            </div>
        </div>
     
          <div class="menu" id="mobile-menu">
                
                
                <a class="menu-item" href="/posts/" title="">Blog</a>
                
                <a class="menu-item" href="http://balance.mr-wei.cn" title="">BalanceCar</a>
                
                <a class="menu-item" href="/categories/" title="">Categories</a>
                
                <a class="menu-item" href="/tags/" title="">Tags</a>
                
                <a class="menu-item" href="/about/" title="About">About</a>
                
        </div>
    </div>
</nav>







    	 <main class="main">
          <div class="container">
      		
<article class="post-warp" itemscope itemtype="http://schema.org/Article">
    <header class="post-header">
        <h1 class="post-title" itemprop="name headline">NRF52840修改LFCLK时钟源</h1>
        <div class="post-meta">
                Written by <a itemprop="name" href="http://blog.mr-wei.cn" rel="author">Mr.wei</a> with ♥ 
                <span class="post-time">
                on <time datetime=2019-09-05 itemprop="datePublished">September 5, 2019</time>
                </span>
                in
                <i class="iconfont icon-folder"></i>
                <span class="post-category">
                        
                </span>
        </div>
    </header>
    <div class="post-content">
        

        

        
        
     
          
          
          

          
          
          

          

<h1 id="lfclk的时钟源">LFCLK的时钟源</h1>

<p>NRF52840的LFCLK时钟源支持以下3种来源:<br/></p>

<ol>
<li>LFRC 32.768KHz RC oscillator<br/></li>
<li>LFXO 32.768KHz crystal oscillator<br/></li>
<li>LFSYNT 32.768KHz synthesized from HFCLK<br/></li>
</ol>

<h1 id="修改lfclk时钟源为rc">修改LFCLK时钟源为RC</h1>

<pre><code class="language-C">// &lt;o&gt; NRFX_CLOCK_CONFIG_LF_SRC  - LF Clock Source
// &lt;0=&gt; RC 
// &lt;1=&gt; XTAL 
// &lt;2=&gt; Synth 
// &lt;131073=&gt; External Low Swing 
// &lt;196609=&gt; External Full Swing 
#ifndef NRFX_CLOCK_CONFIG_LF_SRC
#define NRFX_CLOCK_CONFIG_LF_SRC 0	//mr-wei
#endif

// &lt;o&gt; CLOCK_CONFIG_LF_SRC  - LF Clock Source
// &lt;0=&gt; RC 
// &lt;1=&gt; XTAL 
// &lt;2=&gt; Synth 
// &lt;131073=&gt; External Low Swing 
// &lt;196609=&gt; External Full Swing 
#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0		//mr-wei
#endif

// &lt;o&gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
// &lt;0=&gt; NRF_CLOCK_LF_SRC_RC 
// &lt;1=&gt; NRF_CLOCK_LF_SRC_XTAL 
// &lt;2=&gt; NRF_CLOCK_LF_SRC_SYNTH 
#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0		//mr-wei
#endif

// &lt;o&gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16  //mr-wei
#endif

// &lt;o&gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &lt;i&gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &lt;i&gt;  if the temperature has not changed.
#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2  //mr-wei
#endif

// &lt;o&gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &lt;0=&gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &lt;1=&gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &lt;2=&gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &lt;3=&gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &lt;4=&gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &lt;5=&gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &lt;6=&gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &lt;7=&gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &lt;8=&gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &lt;9=&gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &lt;10=&gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &lt;11=&gt; NRF_CLOCK_LF_ACCURACY_1_PPM 
#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1  //mr-wei
#endif
</code></pre>

    </div>

    <div class="post-copyright">
             
            <p class="copyright-item">
                <span>Author:</span>
                <span>Mr.wei </span>
                </p>
            
           
             
            <p class="copyright-item">
                    <span>Link:</span>
                    <a href=http://blog.mr-wei.cn/2019/nrf52840%E4%BF%AE%E6%94%B9lfclk%E6%97%B6%E9%92%9F%E6%BA%90/>http://blog.mr-wei.cn/2019/nrf52840%E4%BF%AE%E6%94%B9lfclk%E6%97%B6%E9%92%9F%E6%BA%90/</span>
            </p>
            
             
            <p class="copyright-item lincese">
                本文采用<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/" #target="_blank">知识共享署名-非商业性使用 4.0 国际许可协议</a>进行许可
            </p>
            
    </div>

  
    <div class="post-tags">
        
            <section>
            <i class="iconfont icon-tag"></i>Tag(s): 
            
            <span class="tag"><a href="http://blog.mr-wei.cn/tags/nrf52840/">
                    #NRF52840</a></span>
            
            </section>
        
        <section>
                <a href="javascript:window.history.back();">back</a></span> · 
                <span><a href="http://blog.mr-wei.cn">home</a></span>
        </section>
    </div>

    <div class="post-nav">
        
        <a href="http://blog.mr-wei.cn/2019/debian-9-%E5%AE%89%E8%A3%85%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2/" class="prev" rel="prev" title="Debian 9 安装远程桌面"><i class="iconfont icon-left"></i>&nbsp;Debian 9 安装远程桌面</a>
         
        
    </div>

    <div class="post-comment">
          
                 
          
    </div>
</article>
          </div>
		   </main>
      <footer class="footer">
    <div class="copyright">
        &copy;
        
        <span itemprop="copyrightYear">2018 - 2019</span>
        
        <span class="with-love">
    	 <i class="iconfont icon-love"></i> 
         </span>
         
            <span class="author" itemprop="copyrightHolder"><a href="http://blog.mr-wei.cn">Mr.wei</a> | </span> 
         

         
            <a href="http://www.miibeian.gov.cn/" target="_blank" rel="external nofollow">冀ICP备 - 18032379号 </a> |
         
		  <span>Powered by <a href="https://gohugo.io/" target="_blank" rel="external nofollow">Hugo</a> & <a href="https://github.com/liuzc/leaveit" target="_blank" rel="external nofollow">LeaveIt</a></span> 
    </div>

	
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [['$','$'], ['\\(','\\)']],
            displayMath: [['$$','$$'], ['\[','\]']],
            processEscapes: true,
            processEnvironments: true,
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
            TeX: {
                equationNumbers: { autoNumber: "AMS" },
                extensions: ["AMSmath.js", "AMSsymbols.js"]
            }
        }
    });
</script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script>
	
	

</footer>












    
    
    <script src="/js/vendor_no_gallery.min.js" async=""></script>
    
  



     </div>
  </body>
</html>
